<!DOCTYPE html>
<html lang="en">
	<head>
		<include file="Index/head" />
	</head>

	<body>
		<include file="Index/header" />

		<div class="main-container" id="main-container">
			<script type="text/javascript">
				try{ace.settings.check('main-container' , 'fixed')}catch(e){}
			</script>

			<div class="main-container-inner">
				<a class="menu-toggler" id="menu-toggler" href="#">
					<span class="menu-text"></span>
				</a>

				<include file="Index/menu" />
				
				<div class="main-content">
					<include file="Index/nav" />

					<div class="page-content">
						
							<!-- /**
							 * 右侧页面begin
							 */ -->
								<div class="row">
									<div class="col-xs-12">
										<div class="table-header">
											你投票我检测
										</div>

										<div class="table-responsive">
											<div id="sample-table-2_wrapper" class="dataTables_wrapper" role="grid">
											<div class="row">
											<div class="col-sm-6">
											<div id="sample-table-2_length" class="dataTables_length">

											</div>
											</div>
											<div class="col-sm-6" style="margin-bottom:-20px; width:100%;">
											<div class="dataTables_filter" id="sample-table-2_filter">
											<label style="float:left;">
											<a href="{:U('Admin/Acsuzhou/check_product_lists',array('ishidden' => 1))}">
												<button class="btn btn-xs btn-danger">
													<i></i>
													待审核
												</button>
											</a>
											</label>
											<label style="float:left;">
											<a href="{:U('Admin/Acsuzhou/check_product_lists',array('ishidden' => 3))}">
												<button class="btn btn-xs btn-danger">
													<i></i>
													投票中
												</button>
											</a>
											</label>
											<label style="float:left;">
											<a href="{:U('Admin/Acsuzhou/check_product_lists',array('ishidden' => 0))}">
												<button class="btn btn-xs btn-danger">
													<i></i>
													待检测
												</button>
											</a>
											</label>
											<label style="float:left;">
											<a href="{:U('Admin/Acsuzhou/check_product_lists',array('ishidden' => 2))}">
												<button class="btn btn-xs btn-danger">
													<i></i>
													原始数据
												</button>
											</a>
											</label>
											<!-- <label>搜索: <input type="text" aria-controls="sample-table-2"> -->
											<a href="{:U('Admin/Acsuzhou/add_product')}">
												<p style="margin-top:20px;"><button type="button" class="btn btn-white">添加产品</button></p>
											</a>
											</label>
											</div>
											</div>
											</div>
											<table id="sample-table-2" class="table table-striped table-bordered table-hover dataTable" aria-describedby="sample-table-2_info">
												<thead>
													<tr role="row">
													<th  role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" aria-label="Domain: activate to sort column ascending" style="width: 100px;">ID</th>
													<th role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" aria-label="Price: activate to sort column ascending" >商品名</th>
													<th role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" aria-label="Clicks: activate to sort column ascending">图片</th>
													<th class="hidden-480" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" aria-label="Status: activate to sort column ascending">用户</th>
													<th class="hidden-480" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" aria-label="Status: activate to sort column ascending">投票数</th>
													<th class="hidden-480" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" aria-label="Status: activate to sort column ascending">创建时间</th>
													<th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1" aria-label=""></th></tr>
												</thead>
											<tbody role="alert" aria-live="polite" aria-relevant="all">
											<volist name="list" id="vo">
											<tr class="odd">
												<td class=" ">{$vo.id}</td>
												<td class=" ">{$vo.name}</td>
												<td class=" "><img src="{$vo.img}" style="width:70px;"></td>
												<td class="">{$vo.username}</td>
												<td class=""><a href="{:U('Admin/Acsuzhou/product_vote_log',array('id' => $vo['id']))}">{$vo.vote_num}</a></td>
												<td class=" ">{$vo.ctime|date="Y-m-d H:i:s",###}</td>
												<td class=" ">
													<div class="visible-md visible-lg hidden-sm hidden-xs action-buttons">
														<if condition="$vo.ishidden eq 1">
															<a href="javascript:agree_pass_check_product({$vo.id})">
																<div class="btn-group dropup">
																	<button class="btn btn-xs btn-success">
																		<i class="icon-ok"></i>
																		通过
																	</button>
																</div>
															</a>
														</if>
														<a href="{:U('Admin/Acsuzhou/modify_product_img',array('id' => $vo['id']))}">
															<div class="btn-group dropup">
																<button class="btn btn-xs btn-danger">
																	<i class="icon-ok"></i>
																	修改
																</button>
															</div>
														</a>
														<a href="javascript:del_check_product({$vo.id})">
															<div class="btn-group dropup">
																<button class="btn btn-xs btn-danger">
																	<i class="icon-ok"></i>
																	删除
																</button>
															</div>
														</a>
													</div>

													<div class="visible-xs visible-sm hidden-md hidden-lg">
														<div class="inline position-relative">
															<button class="btn btn-minier btn-yellow dropdown-toggle" data-toggle="dropdown">
																<i class="icon-caret-down icon-only bigger-120"></i>
															</button>

															<ul class="dropdown-menu dropdown-only-icon dropdown-yellow pull-right dropdown-caret dropdown-close">
																<li>
																	<a href="#" class="tooltip-info" data-rel="tooltip" data-original-title="View">
																		<span class="blue">
																			<i class="icon-zoom-in bigger-120"></i>
																		</span>
																	</a>
																</li>

																<li>
																	<a href="#" class="tooltip-success" data-rel="tooltip" title="" data-original-title="Edit">
																		<span class="green">
																			<i class="icon-edit bigger-120"></i>
																		</span>
																	</a>
																</li>

																<li>
																	<a href="#" class="tooltip-error" data-rel="tooltip" title="" data-original-title="Delete">
																		<span class="red">
																			<i class="icon-trash bigger-120"></i>
																		</span>
																	</a>
																</li>
															</ul>
														</div>
													</div>
												</td>
											</tr>
											</volist>
											</tbody>
											</table>
											<div class="row">
												<div class="col-sm-6">
													<div class="dataTables_info" id="sample-table-2_info">Showing 1 to 10 of 23 entries</div>
												</div>
												<div class="col-sm-6">
													<div class="dataTables_paginate paging_bootstrap">
														<ul class="pagination">
															{$show}
														</ul>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>

							<!-- /**
							 * 右侧页面end
							 */ -->
					</div><!-- /.page-content -->
				</div>

			</div><!-- /.main-container-inner -->

			<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
				<i class="icon-double-angle-up icon-only bigger-110"></i>
			</a>
		</div><!-- /.main-container -->

		<include file="Index/footer" />
<script type="text/javascript">
function del_check_product(id)
{
	// alert(id); return;
	var r= confirm('确定删除该商品?');
	if(r)
	{
		var now_url = window.location.href;
		var url = "{:U('Admin/Acsuzhou/del_check_product')}";
		var id = id;
		$.ajax({
			type: 'post',
			url: url,
			data: {id:id},
			dataType: 'json',
			success: function(data){
				if(data==1){
					window.location.href=now_url;
				}
			}
		});
	}
	else
	{
		return false;
	}
}

function agree_pass_check_product(id){
	// alert(id); return;
	var r= confirm('确定通过审核?');
	if(r)
	{
		var now_url = window.location.href;
		var url = "{:U('Admin/Acsuzhou/agree_pass_check_product')}";
		var id = id;
		$.ajax({
			type: 'post',
			url: url,
			data: {id:id},
			dataType: 'json',
			success: function(data){
				if(data==1){
					window.location.href=now_url;
				}
			}
		});
	}
	else
	{
		return false;
	}
}
</script>
	</body>
</html>
